\(\int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{5/2}} \, dx\) [6]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [C] (verified)
   Fricas [C] (verification not implemented)
   Sympy [F]
   Maxima [F]
   Giac [F]
   Mupad [F(-1)]

Optimal result

Integrand size = 23, antiderivative size = 147 \[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{5/2}} \, dx=\frac {6 A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 b^2 d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 B \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{3 b^3 d}+\frac {2 A \sin (c+d x)}{5 b d (b \sec (c+d x))^{3/2}}+\frac {2 B \sin (c+d x)}{3 b^2 d \sqrt {b \sec (c+d x)}} \]

[Out]

2/5*A*sin(d*x+c)/b/d/(b*sec(d*x+c))^(3/2)+2/3*B*sin(d*x+c)/b^2/d/(b*sec(d*x+c))^(1/2)+6/5*A*(cos(1/2*d*x+1/2*c
)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticE(sin(1/2*d*x+1/2*c),2^(1/2))/b^2/d/cos(d*x+c)^(1/2)/(b*sec(d*x+c))^(1/2
)+2/3*B*(cos(1/2*d*x+1/2*c)^2)^(1/2)/cos(1/2*d*x+1/2*c)*EllipticF(sin(1/2*d*x+1/2*c),2^(1/2))*cos(d*x+c)^(1/2)
*(b*sec(d*x+c))^(1/2)/b^3/d

Rubi [A] (verified)

Time = 0.12 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3872, 3854, 3856, 2719, 2720} \[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{5/2}} \, dx=\frac {6 A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 b^2 d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 A \sin (c+d x)}{5 b d (b \sec (c+d x))^{3/2}}+\frac {2 B \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{3 b^3 d}+\frac {2 B \sin (c+d x)}{3 b^2 d \sqrt {b \sec (c+d x)}} \]

[In]

Int[(A + B*Sec[c + d*x])/(b*Sec[c + d*x])^(5/2),x]

[Out]

(6*A*EllipticE[(c + d*x)/2, 2])/(5*b^2*d*Sqrt[Cos[c + d*x]]*Sqrt[b*Sec[c + d*x]]) + (2*B*Sqrt[Cos[c + d*x]]*El
lipticF[(c + d*x)/2, 2]*Sqrt[b*Sec[c + d*x]])/(3*b^3*d) + (2*A*Sin[c + d*x])/(5*b*d*(b*Sec[c + d*x])^(3/2)) +
(2*B*Sin[c + d*x])/(3*b^2*d*Sqrt[b*Sec[c + d*x]])

Rule 2719

Int[Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticE[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ[{
c, d}, x]

Rule 2720

Int[1/Sqrt[sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[(2/d)*EllipticF[(1/2)*(c - Pi/2 + d*x), 2], x] /; FreeQ
[{c, d}, x]

Rule 3854

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[Cos[c + d*x]*((b*Csc[c + d*x])^(n + 1)/(b*d*n)), x
] + Dist[(n + 1)/(b^2*n), Int[(b*Csc[c + d*x])^(n + 2), x], x] /; FreeQ[{b, c, d}, x] && LtQ[n, -1] && Integer
Q[2*n]

Rule 3856

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Dist[(b*Csc[c + d*x])^n*Sin[c + d*x]^n, Int[1/Sin[c + d
*x]^n, x], x] /; FreeQ[{b, c, d}, x] && EqQ[n^2, 1/4]

Rule 3872

Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Dist[a, Int[(d*
Csc[e + f*x])^n, x], x] + Dist[b/d, Int[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]

Rubi steps \begin{align*} \text {integral}& = A \int \frac {1}{(b \sec (c+d x))^{5/2}} \, dx+\frac {B \int \frac {1}{(b \sec (c+d x))^{3/2}} \, dx}{b} \\ & = \frac {2 A \sin (c+d x)}{5 b d (b \sec (c+d x))^{3/2}}+\frac {2 B \sin (c+d x)}{3 b^2 d \sqrt {b \sec (c+d x)}}+\frac {(3 A) \int \frac {1}{\sqrt {b \sec (c+d x)}} \, dx}{5 b^2}+\frac {B \int \sqrt {b \sec (c+d x)} \, dx}{3 b^3} \\ & = \frac {2 A \sin (c+d x)}{5 b d (b \sec (c+d x))^{3/2}}+\frac {2 B \sin (c+d x)}{3 b^2 d \sqrt {b \sec (c+d x)}}+\frac {(3 A) \int \sqrt {\cos (c+d x)} \, dx}{5 b^2 \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {\left (B \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}\right ) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{3 b^3} \\ & = \frac {6 A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{5 b^2 d \sqrt {\cos (c+d x)} \sqrt {b \sec (c+d x)}}+\frac {2 B \sqrt {\cos (c+d x)} \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right ) \sqrt {b \sec (c+d x)}}{3 b^3 d}+\frac {2 A \sin (c+d x)}{5 b d (b \sec (c+d x))^{3/2}}+\frac {2 B \sin (c+d x)}{3 b^2 d \sqrt {b \sec (c+d x)}} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.68 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.60 \[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{5/2}} \, dx=\frac {2 \left (9 A E\left (\left .\frac {1}{2} (c+d x)\right |2\right )+5 B \operatorname {EllipticF}\left (\frac {1}{2} (c+d x),2\right )+\sqrt {\cos (c+d x)} (5 B+3 A \cos (c+d x)) \sin (c+d x)\right )}{15 d \cos ^{\frac {5}{2}}(c+d x) (b \sec (c+d x))^{5/2}} \]

[In]

Integrate[(A + B*Sec[c + d*x])/(b*Sec[c + d*x])^(5/2),x]

[Out]

(2*(9*A*EllipticE[(c + d*x)/2, 2] + 5*B*EllipticF[(c + d*x)/2, 2] + Sqrt[Cos[c + d*x]]*(5*B + 3*A*Cos[c + d*x]
)*Sin[c + d*x]))/(15*d*Cos[c + d*x]^(5/2)*(b*Sec[c + d*x])^(5/2))

Maple [C] (verified)

Result contains complex when optimal does not.

Time = 16.66 (sec) , antiderivative size = 568, normalized size of antiderivative = 3.86

method result size
parts \(-\frac {2 A \left (3 i \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \cos \left (d x +c \right )-3 i \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \cos \left (d x +c \right )+6 i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )-6 i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )+3 i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sec \left (d x +c \right )-3 i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticE}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sec \left (d x +c \right )-\cos \left (d x +c \right )^{2} \sin \left (d x +c \right )-\cos \left (d x +c \right ) \sin \left (d x +c \right )-3 \sin \left (d x +c \right )\right )}{5 d \left (\cos \left (d x +c \right )+1\right ) \sqrt {b \sec \left (d x +c \right )}\, b^{2}}-\frac {2 B \left (i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right )+i \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \operatorname {EllipticF}\left (i \left (-\cot \left (d x +c \right )+\csc \left (d x +c \right )\right ), i\right ) \sec \left (d x +c \right )-\sin \left (d x +c \right )\right )}{3 d \sqrt {b \sec \left (d x +c \right )}\, b^{2}}\) \(568\)
default \(\frac {\frac {6 i A \operatorname {EllipticF}\left (i \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \cos \left (d x +c \right )}{5}-\frac {6 i A \operatorname {EllipticE}\left (i \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \cos \left (d x +c \right )}{5}+\frac {2 i B \operatorname {EllipticF}\left (i \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \cos \left (d x +c \right )}{3}+\frac {12 i A \operatorname {EllipticF}\left (i \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}}{5}-\frac {12 i A \operatorname {EllipticE}\left (i \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}}{5}+\frac {4 i B \operatorname {EllipticF}\left (i \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}}{3}+\frac {6 i A \operatorname {EllipticF}\left (i \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sec \left (d x +c \right )}{5}-\frac {6 i A \operatorname {EllipticE}\left (i \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sec \left (d x +c \right )}{5}+\frac {2 A \sin \left (d x +c \right ) \cos \left (d x +c \right )^{2}}{5}+\frac {2 i B \operatorname {EllipticF}\left (i \left (\cot \left (d x +c \right )-\csc \left (d x +c \right )\right ), i\right ) \sqrt {\frac {\cos \left (d x +c \right )}{\cos \left (d x +c \right )+1}}\, \sqrt {\frac {1}{\cos \left (d x +c \right )+1}}\, \sec \left (d x +c \right )}{3}+\frac {2 A \cos \left (d x +c \right ) \sin \left (d x +c \right )}{5}+\frac {2 B \sin \left (d x +c \right ) \cos \left (d x +c \right )}{3}+\frac {6 A \sin \left (d x +c \right )}{5}+\frac {2 B \sin \left (d x +c \right )}{3}}{d \left (\cos \left (d x +c \right )+1\right ) \sqrt {b \sec \left (d x +c \right )}\, b^{2}}\) \(635\)

[In]

int((A+B*sec(d*x+c))/(b*sec(d*x+c))^(5/2),x,method=_RETURNVERBOSE)

[Out]

-2/5*A/d/(cos(d*x+c)+1)/(b*sec(d*x+c))^(1/2)/b^2*(3*I*(1/(cos(d*x+c)+1))^(1/2)*(cos(d*x+c)/(cos(d*x+c)+1))^(1/
2)*EllipticF(I*(-cot(d*x+c)+csc(d*x+c)),I)*cos(d*x+c)-3*I*(1/(cos(d*x+c)+1))^(1/2)*(cos(d*x+c)/(cos(d*x+c)+1))
^(1/2)*EllipticE(I*(-cot(d*x+c)+csc(d*x+c)),I)*cos(d*x+c)+6*I*(1/(cos(d*x+c)+1))^(1/2)*(cos(d*x+c)/(cos(d*x+c)
+1))^(1/2)*EllipticF(I*(-cot(d*x+c)+csc(d*x+c)),I)-6*I*(1/(cos(d*x+c)+1))^(1/2)*(cos(d*x+c)/(cos(d*x+c)+1))^(1
/2)*EllipticE(I*(-cot(d*x+c)+csc(d*x+c)),I)+3*I*(1/(cos(d*x+c)+1))^(1/2)*(cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*Ell
ipticF(I*(-cot(d*x+c)+csc(d*x+c)),I)*sec(d*x+c)-3*I*(1/(cos(d*x+c)+1))^(1/2)*(cos(d*x+c)/(cos(d*x+c)+1))^(1/2)
*EllipticE(I*(-cot(d*x+c)+csc(d*x+c)),I)*sec(d*x+c)-cos(d*x+c)^2*sin(d*x+c)-cos(d*x+c)*sin(d*x+c)-3*sin(d*x+c)
)-2/3*B/d/(b*sec(d*x+c))^(1/2)/b^2*(I*(1/(cos(d*x+c)+1))^(1/2)*(cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*EllipticF(I*(
-cot(d*x+c)+csc(d*x+c)),I)+I*(1/(cos(d*x+c)+1))^(1/2)*(cos(d*x+c)/(cos(d*x+c)+1))^(1/2)*EllipticF(I*(-cot(d*x+
c)+csc(d*x+c)),I)*sec(d*x+c)-sin(d*x+c))

Fricas [C] (verification not implemented)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.10 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.12 \[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{5/2}} \, dx=\frac {-5 i \, \sqrt {2} B \sqrt {b} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 5 i \, \sqrt {2} B \sqrt {b} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 9 i \, \sqrt {2} A \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) - 9 i \, \sqrt {2} A \sqrt {b} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right ) + 2 \, {\left (3 \, A \cos \left (d x + c\right )^{2} + 5 \, B \cos \left (d x + c\right )\right )} \sqrt {\frac {b}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{15 \, b^{3} d} \]

[In]

integrate((A+B*sec(d*x+c))/(b*sec(d*x+c))^(5/2),x, algorithm="fricas")

[Out]

1/15*(-5*I*sqrt(2)*B*sqrt(b)*weierstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c)) + 5*I*sqrt(2)*B*sqrt(b)
*weierstrassPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c)) + 9*I*sqrt(2)*A*sqrt(b)*weierstrassZeta(-4, 0, weie
rstrassPInverse(-4, 0, cos(d*x + c) + I*sin(d*x + c))) - 9*I*sqrt(2)*A*sqrt(b)*weierstrassZeta(-4, 0, weierstr
assPInverse(-4, 0, cos(d*x + c) - I*sin(d*x + c))) + 2*(3*A*cos(d*x + c)^2 + 5*B*cos(d*x + c))*sqrt(b/cos(d*x
+ c))*sin(d*x + c))/(b^3*d)

Sympy [F]

\[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{5/2}} \, dx=\int \frac {A + B \sec {\left (c + d x \right )}}{\left (b \sec {\left (c + d x \right )}\right )^{\frac {5}{2}}}\, dx \]

[In]

integrate((A+B*sec(d*x+c))/(b*sec(d*x+c))**(5/2),x)

[Out]

Integral((A + B*sec(c + d*x))/(b*sec(c + d*x))**(5/2), x)

Maxima [F]

\[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{5/2}} \, dx=\int { \frac {B \sec \left (d x + c\right ) + A}{\left (b \sec \left (d x + c\right )\right )^{\frac {5}{2}}} \,d x } \]

[In]

integrate((A+B*sec(d*x+c))/(b*sec(d*x+c))^(5/2),x, algorithm="maxima")

[Out]

integrate((B*sec(d*x + c) + A)/(b*sec(d*x + c))^(5/2), x)

Giac [F]

\[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{5/2}} \, dx=\int { \frac {B \sec \left (d x + c\right ) + A}{\left (b \sec \left (d x + c\right )\right )^{\frac {5}{2}}} \,d x } \]

[In]

integrate((A+B*sec(d*x+c))/(b*sec(d*x+c))^(5/2),x, algorithm="giac")

[Out]

integrate((B*sec(d*x + c) + A)/(b*sec(d*x + c))^(5/2), x)

Mupad [F(-1)]

Timed out. \[ \int \frac {A+B \sec (c+d x)}{(b \sec (c+d x))^{5/2}} \, dx=\int \frac {A+\frac {B}{\cos \left (c+d\,x\right )}}{{\left (\frac {b}{\cos \left (c+d\,x\right )}\right )}^{5/2}} \,d x \]

[In]

int((A + B/cos(c + d*x))/(b/cos(c + d*x))^(5/2),x)

[Out]

int((A + B/cos(c + d*x))/(b/cos(c + d*x))^(5/2), x)